﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Chain_Customer.aspx.cs" Inherits="masterdata_Chain_Customer" MasterPageFile="~/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../JavaScript/common.js" type="text/javascript"></script>
    <script src="../JavaScript/empchecks.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="6">
                    经销商 -
                    <asp:Label ID="lblChain" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    部门
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox ID="txtOrg" runat="server" onkeydown="alert('请选择部门');return false;"
                        OnTextChanged="txtOrg_TextChanged"></asp:TextBox>
                    <img src="../Resources/Images/search.png" alt="查找" 
                        style="cursor: pointer; height: 19px; width: 20px;" 
                        onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&ChainsControlID=<%# txtHidChains.UniqueID %>&SelectType=multi','','300','500');" />
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal2" runat="server" Text="<%$resources:language,lbl_SalesChannel %>"></asp:Literal>
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChannel" Width="130">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    &nbsp;
                </td>
                <td nowrap="nowrap">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    经销商名称
                </td>
                <td>
                    <asp:DropDownList ID="ddlChains" runat="server">
                        <asp:ListItem Value="">--所有--</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    门店名称
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtCustomer" MaxLength="20" Width="130px"></asp:TextBox>
                </td>
                <td class="tablefield">
                </td>
                <td nowrap="nowrap">
                    <input id="txtHidOrg" type="hidden" runat="server" />
                    <input id="txtHidChains" type="hidden" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    状态
                </td>
                <td>
                <asp:DropDownList ID="ddlStatus" runat="server">
                        <asp:ListItem Value="">--所有--</asp:ListItem>
                        <asp:ListItem Value="1" Selected="True">已分配</asp:ListItem>
                        <asp:ListItem Value="0">未分配</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td class="tablefield">
                    &nbsp;</td>
                <td nowrap="nowrap">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="buttonarea" colspan="6">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请选择部门!"
                        ControlToValidate="txtOrg"></asp:RequiredFieldValidator>
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="<%$resources:language,btn_Query %>"
                        OnClick="btnQuery_Click" />
                    &nbsp;
                    <input id="Button1" type="button" class="wsd_button2" runat="server" size="47" value="重  置"
                        name="reset" onclick="clearForm('form1')" />
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    门店列表
                </td>
            </tr>
        </table>
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView BorderWidth="0" Width="100%" ID="gvCustomerList" runat="server" AutoGenerateColumns="false"
                        EmptyDataText="<%$resources:language,lbl_Empty %>" EmptyDataRowStyle-Font-Bold="true"
                        EmptyDataRowStyle-HorizontalAlign="Center"
                        EnableEmptyContentRender="true" AllowPaging="True" PageSize="20" 
                        OnPageIndexChanging="gvCustomerList_PageIndexChanging" DataKeyNames="ID,INCLUDE">
                        <HeaderStyle CssClass="titlist" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                            <asp:BoundField HeaderText="门店编号" DataField="ID" />
                            <asp:BoundField HeaderText="门店名称" DataField="NAME" />
                            <asp:BoundField HeaderText="渠道类型" DataField="Channel" />
                            <asp:BoundField HeaderText="地址" DataField="ADDRESS_LINE" />
                            <asp:BoundField HeaderText="固定电话" DataField="TELEPHONE" />
                            <asp:BoundField HeaderText="手机" DataField="FAX" />
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <asp:CheckBox runat="server" ID="cbxAllSelected" onclick="CheckAll('gvCustomerList',this,'cbxSelected')" />全选
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="cbxSelected" Checked='<%# Convert.ToBoolean(Eval("INCLUDE")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                        <PagerSettings PageButtonCount="20" FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast"
                            NextPageText="下一页" PreviousPageText="上一页" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="btnAllInclude" runat="server" Text="全部包含" 
                        CssClass="wsd_button2" OnClientClick="return confirm('注意:此操作会选中所有门店并提交，请慎重!')" 
                        onclick="btnAllInclude_Click" />&nbsp;&nbsp;
                     <asp:Button ID="btnAllUninclude" runat="server" Text="全部取消" 
                        CssClass="wsd_button2" OnClientClick="return confirm('注意:此操作会取消所有门店并提交，请慎重!')" 
                        onclick="btnAllUninclude_Click" />&nbsp;&nbsp;
                    <asp:Button ID="btnSubmiet" runat="server" class="wsd_button2" Text="提  交" 
                        onclick="btnSubmiet_Click" />&nbsp;&nbsp;
                    <input id="btnCancel" type="button" value="返  回" class="wsd_button2" onclick="location.href='Chain_List.aspx'" />
                </td>
            </tr>
        </table>
    </div>
 </asp:Content>
